package com.cy.pj.sys.dao;

import com.cy.pj.common.vo.Node;
import com.cy.pj.sys.entity.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * The interface Sys menu dao.
 *
 * @Auther: 逗逼子民
 * @Date: 2019 /7/10 14:41
 * @Description:
 */
@Mapper
public interface SysMenuDao {
    /**
     * Insert object int.
     *
     * @param entity the entity
     * @return the int
     */
    int updateObject(SysMenu entity);

    int insertObject(SysMenu entity);

    /**
     * Find ztree menu nodes list.
     *
     * @return the list
     */
    @Select("select id,name,parentId from sys_menus")
     List<Node> findZtreeMenuNodes();


    /**
     * Find objects list.
     *
     * @return the list
     */
    List<Map<String, Object>> findObjects();
}
